const { defineConfig } = require('@vue/cli-service');
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');

let config = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    plugins: [
      new CopyWebpackPlugin({
        patterns: [{
          from: path.resolve(__dirname, 'public'),
          to: 'server',
        }]
      })
    ]
  },
  devServer: {
    host: '0.0.0.0',
    port: 3000,
    proxy: 'http://127.0.0.1:8000',
    open: false
  }
});

module.exports = config;
